package cn.edu.neusoft.demo.hospital2.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@TableName("department")
public class Department implements Serializable {
    @TableId(value = "department_id", type = IdType.AUTO)
    private int departmentId;
    private String departmentName;
    private int level;
    private int parentId;
    private Date createTime;

    // 非数据库字段
    @TableField(exist = false)
    private List<Department> children; // 子科室

    @TableField(exist = false)
    private List<Room> rooms; // 关联诊室

    @TableField(exist = false)
    private List<SpecialClinic> clinics; // 关联特色门诊

    public int getDepartmentId() {
        return departmentId;
    }
    public void setDepartmentId(int departmentId) {
        this.departmentId = departmentId;
    }
    public String getDepartmentName() {
        return departmentName;
    }
    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }
    public int getLevel() {
        return level;
    }
    public void setLevel(int level) {
        this.level = level;
    }
    public int getParentId() {
        return parentId;
    }
    public void setParentId(int parentId) {
        this.parentId = parentId;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}


